<?php

namespace app\index\traits;

use app\common\model\ConsultingMessage;

/**
 * Trait MessagePropertyTrait
 * @package app\index\traits
 */
trait MessagePropertyTrait
{

    /**
     * 消息动态属性 is_my
     * @param ConsultingMessage $message
     * @param $receiveId
     * @return string
     */
    private function getIsMy(ConsultingMessage $message, $receiveId)
    {
        return $message->senderType == 'member' && $receiveId == $message->senderId ? '101' : '102';
    }
}